﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/AdminMaster.master" AutoEventWireup="true" CodeFile="RemoveAllocation.aspx.cs" Inherits="RemoveAllocation" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .td {
            font-size: 12px;
            font-weight: normal;
            padding: 2px;
            color: #000;
            vertical-align: top;
        }

        .auto-style4 {
            height: 59px;
            width: 557px;
        }

        .hiddencol {
            display: none;
        }

        .viscol {
            display: block;
        }
        .auto-style6 {
            width: 100px;
        }
        .auto-style7 {
            height: 59px;
            width: 94px;
        }
    </style>
    <script type="text/javascript">
        function validateRemark() {
            alert("nilesh");
            var enteredValue = $("#txtRemark");

            if (length(enteredValue) > 0) {
                alert("Start Date not valid");
                enteredValue.focus();
                return false;
            }
        }
        function UserDeleteConfirmation() {
            return confirm("Are you sure you want to delete this user?");
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
    </asp:ScriptManager>
    <script type="text/javascript" lang="javascript">

       <%-- function RefreshParent() {
            document.getElementById("<%=mp1.ClientID %>").style("display:none");
            window.close();
        }
        function popup() {
            var WinSettings = "center:yes;resizable:no;dialogHeight:300px"
            // ALTER BELOW LINE - supply correct URL for Child Form
            var MyArgs = window.showModalDialog("CandidateFeeAllocation.aspx", WinSettings);
        }
        function Validate(sender, args) {
            var gridView = document.getElementById("<%=gvStatusDashboard.ClientID %>");
            var checkBoxes = gridView.getElementsByTagName("input");
            if (checkBoxes != undefined) {
                for (var i = 0; i < checkBoxes.length; i++) {
                    if (checkBoxes[i].type == "checkbox" && checkBoxes[i].checked) {
                        args.IsValid = true;
                        return;
                    }
                }
                args.IsValid = false;
            }
            else {
                args.IsValid = true;
                return;
            }
        }
        //////////////////////////////////////
        function checkAll(objRef, type) {

            if (type == 'H') {
                var GridView = objRef.parentNode.parentNode.parentNode;
                var inputList = GridView.getElementsByTagName("input");
                for (var i = 0; i < inputList.length; i++) {
                    var row = inputList[i].parentNode.parentNode;
                    if (inputList[i].type == "checkbox" && objRef != inputList[i]) {
                        if (objRef.checked) {
                            inputList[i].checked = true;
                        }
                        else {
                            inputList[i].checked = false;
                        }
                    }
                }
            }
            if (type == 'I') {
                var row = objRef.parentNode.parentNode;
                var GridView = row.parentNode;
                var inputList = GridView.getElementsByTagName("input");

                if (objRef.checked == false) {
                    var CA = $('#ContentPlaceHolder1_gvStatusDashboard_checkAll');
                    CA[0].checked = false;
                }
            }
        }
        function CallCodeBehindMethod() {
            pageName.CallClose(OnSuccess, OnFailed);
        }

        function OnSuccess(val) {

        }
        function OnSuccess(error) {

        }--%>


    </script>
    <table style="margin-left: 60px; width: 100%;">
        <tbody>
        <tr>
                                <td  align="right" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                             Candidate Registration Number :<font color="red">*</font>&nbsp;
                                </td>
                                <td align="left" width="70%">
                                    <asp:TextBox ID="txtRegNum" runat="server" Width="245px" MaxLength="35" placeholder="Reg. number"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtRegNum" ErrorMessage="Enter Registration Number" ForeColor="Red"></asp:RequiredFieldValidator>
                                </td>
         </tr>
            <tr>
                                <td></td>
                                <td align="left">
                                    <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="BtnSearch_OnClick" /></td>
                            </tr>

        
        
        <tr>
            <td colspan="3">
                   <input id="hdnInput" runat="server" type="hidden" /></td>
        </tr>
        <tr>
                        
            <td colspan="3">
                <asp:GridView ID="gvStatusDashboard" runat="server" 
                    PageSize="10" AllowPaging="true" Width="90%" AutoGenerateColumns="false"
                     HeaderStyle-Height="30px"  OnPageIndexChanging="gvStatusDashboard_PageIndexChanging">
                    <Columns>
                        <asp:BoundField DataField="RegistrationNo" HeaderText="Registration No" />
                        <asp:BoundField DataField="CandidateID" HeaderText="CandidateID" />
                        <asp:BoundField DataField="CountryName" HeaderText="Country Name" />
                        <asp:BoundField DataField="StatusCode" HeaderText="Status" />
                        <asp:BoundField DataField="CandidateName" HeaderText="Candidate Name" />
                        <asp:BoundField DataField="Email" HeaderText="Email" />
                        <asp:TemplateField HeaderText="Remove Allocation">
                                    <ItemTemplate>
                                            <asp:LinkButton ID="lnkDel" Text="Remove Allocation" 
                                            CommandArgument='<%# Eval("RegistrationNo") %>'  OnClientClick="if ( ! CandidateDeleteConfirmation()) return false;" CommandName="DeleteAll"
                                            runat="server" OnClick="lnkDel_Click"></asp:LinkButton>
                                    </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#CCCCCC" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" BorderStyle="None" BorderWidth="0" />
                    <EmptyDataTemplate>
                        No Candidate Available.
                    </EmptyDataTemplate>
                </asp:GridView>
            </td>
        </tr>
        
    </tbody>
    </table>
</asp:Content>

